<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动定位的使用</title>
    <style>
        .box{
            width: 500px;
            height: 500px;
            border: 1px solid red;

        }

        /* 
            先浮动再定位  针对relative     绝对和固定定位设置后浮动无效
         */
        .fp{
            position: relative;
            top: 30px;
            right: 50px;
            float: right;
            width: 200px;
            height: 200px;
            border: 1px solid orange;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="fp">
            浮动和定位的优先级
        </div>
    </div>
</body>
</html>